# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=gnome-color-manager
pkgver=3.24.0+4+ge78025a
pkgrel=2
pkgdesc="GNOME Color Profile Tools"
arch=(i686 x86_64)
url="https://git.gnome.org/browse/gnome-color-manager"
license=(GPL2)
depends=(libcanberra vte3 exiv2 shared-color-targets colord-gtk libexif)
makedepends=(intltool yelp-tools git gnome-common appstream-glib)
optdepends=('argyllcms: color calibration')
options=('!emptydirs')
groups=('gnome-extra')
_commit=e78025ac3ef768eecd0051748044113dc3dcb4eb  # master
source=("git+https://git.gnome.org/browse/gnome-color-manager#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed -e 's/GNOME_COLOR_MANAGER_//' -e 's/_/\./g' -e 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}
  

build(){
  cd $pkgname

  # man pages need docbook-sgml, which we don't have
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
      --libexecdir=/usr/lib/gnome-color-manager --disable-static --disable-man-pages

  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
